<template>
  <div class="navbar-container">
    <!-- 导航栏 -->

    <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
      <div class="container-xl">
        <router-link class="navbar-brand" to="/home">南工社联 NJTSAU</router-link>
        <button
          class="navbar-toggler"
          type="button"
          data-toggle="collapse"
          data-target="#navbarsExample07XL"
          aria-controls="navbarsExample07XL"
          aria-expanded="false"
          aria-label="Toggle navigation"
        >
          <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse" id="navbarsExample07XL">
          <ul class="navbar-nav mr-auto">
            <li class="nav-item active">
              <router-link class="nav-link" to="/home">首页</router-link>
            </li>
            <li class="nav-item dropdown">
              <a
                class="nav-link dropdown-toggle"
                href="#"
                id="dropdown07XL"
                data-toggle="dropdown"
                aria-expanded="false"
              >社团</a>
              <div class="dropdown-menu" aria-labelledby="dropdown07XL">
                <router-link class="dropdown-item" to="/comunitydisplay/allcoms">所有社团</router-link>
                <router-link class="dropdown-item" to="/comunitydisplay/sport">体育竞赛</router-link>
                <router-link class="dropdown-item" to="/comunitydisplay/volunteer">志愿服务</router-link>
                <router-link class="dropdown-item" to="/comunitydisplay/recreation">文娱艺术</router-link>
                <router-link class="dropdown-item" to="/comunitydisplay/society">社会科学</router-link>
                <router-link class="dropdown-item" to="/comunitydisplay/creativity">创意创业</router-link>
                <router-link class="dropdown-item" to="/comunitydisplay/literature">文学语言</router-link>
              </div>
            </li>
            <li class="nav-item dropdown">
              <a
                class="nav-link dropdown-toggle"
                href="#"
                id="dropdown07XL"
                data-toggle="dropdown"
                aria-expanded="false"
              >社联</a>
              <div class="dropdown-menu" aria-labelledby="dropdown07XL">
                <router-link to="/department" class="dropdown-item">职能部门</router-link>
                <router-link to="/center" class="dropdown-item">社团服务中心</router-link>
              </div>
            </li>
            <li class="nav-item dropdown">
              <a
                class="nav-link dropdown-toggle"
                href="#"
                id="dropdown07XL"
                data-toggle="dropdown"
                aria-expanded="false"
              >后台管理系统</a>
              <div class="dropdown-menu" aria-labelledby="dropdown07XL">
                <router-link class="dropdown-item" to="/developing">超级管理员</router-link>
                <router-link class="dropdown-item" to="/developing">系统管理</router-link>
              </div>
            </li>
            <li class="nav-item dropdown">
              <a
                class="nav-link dropdown-toggle"
                href="#"
                id="dropdown07XL"
                data-toggle="dropdown"
                aria-expanded="false"
              >学校官方网站</a>
              <div class="dropdown-menu" aria-labelledby="dropdown07XL">
                <a class="dropdown-item" href="http://www.njtech.edu.cn/">南京工业大学</a>
                <a class="dropdown-item" href="http://xssw.njtech.edu.cn/">教学事务部</a>
                <a class="dropdown-item" href="http://alstu.njtech.edu.cn/LOGIN.ASPX">奥蓝系统</a>
                <a class="dropdown-item" href="http://online.njtech.edu.cn/">工大在线</a>
              </div>
            </li>
            <li class="nav-item dropdown">
              <a
                class="nav-link dropdown-toggle"
                href="#"
                id="dropdown07XL"
                data-toggle="dropdown"
                aria-expanded="false"
              >登录注册</a>
              <div class="dropdown-menu" aria-labelledby="dropdown07XL">
                <router-link class="dropdown-item" to="/login">登录</router-link>
                <router-link class="dropdown-item" to="/register">注册</router-link>
              </div>
            </li>
          </ul>
          <form class="form-inline my-2 my-md-0">
            <input class="form-control" type="text" placeholder="搜索" aria-label="Search" @keyup.13="search()"/>
          </form>
        </div>
      </div>
    </nav>
  </div>

  <!-- 首页 -->
</template>

<script>
export default {
  methods: {
    search(){
      this.$router.push({ path: '/developing' })
    }
  }
};
</script>

<style lang="scss" scoped>
.navbar-container {
  // margin-bottom: 56px;
  // margin: 0 10px;
  .bg-dark {
    background-color: #2891c8 !important;
  }
}
</style>